import machine
import time

pin12 = machine.Pin(12, machine.Pin.OUT)
pin13 = machine.Pin(13, machine.Pin.OUT)

class Run:
    def __init__(self):
        print("初始化完成")
    
    def run(self, num = 12,t = 2):
        p = pin12
        if num == 13:
            p = pin13
            
        while True:
            p.value(1)
            time.sleep(t)
            p.value(0)
            time.sleep(t)
            print("运行了任务",num)
